<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/5/23 0023
 * Time: 17:46
 */

namespace app\wap\validate;


use think\Validate;

class PriceRemind extends Validate
{
    protected $rule = [
        'data'  => '',
        'high'  => 'require|number|>:0',
        'low'   => 'require|number|>:0',
        'cu_id' => 'require|integer',
        'id'    => 'require',
        'title' => 'require',
    ];
    protected $message = [
        'high.require'      =>  '请输入最高价',
        'high.integer'      =>  '价格必须是数字',
        'high.>'            =>  '价格必须大于零',
        'low.require'       =>  '请输入最低价',
        'low.integer'       =>  '价格必须是数字',
        'low.>'             =>  '价格必须大于零',
        'id.require'        =>  '请选择交易对',
        'cu_id.require'     =>  '请选择交易对',
        'title.require'     =>  '请输入交易对名称',
    ];

    protected $scene = [
        'remindcache'       =>['data'],
        'priceremindlist'   =>['data'],
        'getplatformcoin'   =>['data'],
        'priceremindadd'    =>['high','low','cu_id'],
        'pricereminddel'    =>['id'],
        'heightremindlist'  =>['data'],
        'heightremindadd'   =>['cu_id'],
        'heightreminddel'   =>['data'],
        'searchcoin'        =>['title']
    ];
}